local IProvider  = require("script.sdk.provider.IProvider")
local ProviderIOS = class("ProviderIOS", IProvider)

function ProviderIOS:callStaticMethod(methodName,args)
    args = args or {}
    args.methodname = methodName
    args.callback =
        function(parameters)
            parameters = string.split(parameters, "#")
            local pars = {}
            for i=1,#parameters,2 do
                pars[parameters[i]]=parameters[i+1]
            end
            dump(parameters)
            if args.listener then
                args.listener(pars)
            end
        end
    
    local ok ,ret = luaoc.callStaticMethod("AllInOneSDK", "callSdkMethod", args)
    if not ok then
        printError("sdk.AllInOneSDK.ProviderIOS:%s() - call %s failed.",methodName,methodName)
    end
    return ret

end

return ProviderIOS
